Typing constraint logic programs

نویسندگان

  • François Fages
  • Emmanuel Coquery
چکیده

We present a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs. The aim of this type system is to detect programming errors statically. It introduces a type discipline for constraint logic programs and modules, while maintaining the capabilities of performing the usual coercions between constraint domains, and of typing meta-programming predicates, thanks to the flexibility of subtyping. The property of subject reduction expresses the consistency of a prescriptive type system w.r.t. the execution model: if a program is “well-typed”, then all derivations starting from a “well-typed” goal are again “well-typed”. That property is proved w.r.t. the abstract execution model of constraint programming which proceeds by accumulation of constraints only, and w.r.t. an enriched execution model with type constraints for substitutions. We describe our implementation of the system for type checking and type inference. We report our experimental results on type checking ISO-Prolog, the (constraint) libraries of Sicstus Prolog and other Prolog programs.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Types for Web Rule Languages: a preliminary study

We survey and analyse the relevant existing work on typing of rules, in particular on typing of constraint logic programs and discuss applicability of these approaches to the REWERSE reasoning and query languages under development by WG I1 and by WG I4. This is related to WG I1, developing logic programming like languages for reasoning on the web and with WG I4 investigating development of decl...

متن کامل

ar X iv : c s . SE / 0 01 20 07 v 3 5 J an 2 00 1 Kima – an Automated Error Correction System for Concurrent Logic Programs

We have implemented Kima, an automated error correction system for concurrent logic programs. Kima corrects near-misses such as wrong variable occurrences in the absence of explicit declarations of program properties. Strong moding/typing and constraint-based analysis are turning to play fundamental roles in debugging concurrent logic programs as well as in establishing the consistency of commu...

متن کامل

Static Type Inference for the Q language using Constraint Logic Programming

We describe an application of Prolog: a type inference tool for the Q functional language. Q is a terse vector processing language, a descendant of APL, which is getting more and more popular, especially in financial applications. Q is a dynamically typed language, much like Prolog. Extending Q with static typing improves both the readability of programs and programmer productivity, as type err...

متن کامل

Typing Linear Constraints for Moding CLP() Programs

We present a type system for linear constraints over reals and its use in mode analysis of CLP programs. The type system is designed to reason about the properties of definiteness, lower and upper bounds of variables of a linear constraint. Two proof procedures are presented for checking validity of type assertions. The first one considers lower and upper bound types, and it relies on solving h...

متن کامل

Set based failure diagnosis for concurrent constraint programming

Concurrent constraint (CC) programming is a simple and powerful high-level model for concurrent programming. The expressiveness of the CC model has been considerably extended by the Oz Programming Model (OPM) which is realised in the programming language Oz. Oz subsumes well-established programming paradigms such as higher-order functional and object-oriented programming, and it supports proble...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • TPLP

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2001